package com.lindenvalley.de;

import java.util.LinkedList;
import java.util.List;
import java.util.Random;

import com.lindenvalley.de.LearnActivity.EndOfExamTask;
import com.lindenvalley.de.LearnActivity.MyTouchListener;
import com.lindenvalley.de.content.Question;
import com.lindenvalley.de.content.Section;
import com.lindenvalley.de.database.DbSectionsHelper;
import com.lindenvalley.de.network.WorkServer;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.CursorIndexOutOfBoundsException;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.os.Handler;
import android.widget.HorizontalScrollView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class AbstractExamActivity extends Activity{
	
	private final String TAG = getClass().getSimpleName();
	private int currentThemeId;
	private Section section;
	private List<Question> questions;
	private int questionSize;
	private TextView headerView, bodyView, nextView, nameView, currentQuestionLabelView;
	private int currentQuestion, countQuestion, NO_QUESTION = -1;
	private int currentRound = 1;
	private MyTouchListener listener;
	private Random random = new Random();
	private LinearLayout answerLayout, scrollLayout, correctAnswerLayout;
	private List<Integer> showedQuestionNumber;
	private ImageView scrollLeft, scrollRight;
	private HorizontalScrollView scrollView;
	private final int QUESTION_LABEL_ID = 1000;
	public static final int CORRENT_ANSWER = 1;
	public static final int INCORRECT_ANSWER = 0;
	public static final int NOT_ANSWER = -1;
	private DbSectionsHelper sectionsHelper;
	private SQLiteDatabase sectionsWriteDatabase, sectionsReadDatabase;
	private String[] columns = new String[]{"max(" + DbSectionsHelper.ROUND + ")", "count(" + DbSectionsHelper.ANSWER_TYPE + ")" };
	private boolean isExamMode;
	private static final long EXAM_TIMEOUT = 5400000;
	private long examLeft, startExamTime;
	private Handler handler;
	private EndOfExamTask examTask;
	private StringBuilder answersResult;
	private static final String PREF_NAME = "MyPref";
	private SharedPreferences preferences;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
	}
	
	

}
